package com.atguigu.tingshu.user.service;

import com.atguigu.tingshu.model.user.UserInfo;
import com.atguigu.tingshu.vo.album.TrackStatMqVo;
import com.atguigu.tingshu.vo.user.UserCollectVo;
import com.atguigu.tingshu.vo.user.UserInfoVo;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.IService;

import java.util.Map;

public interface UserInfoService extends IService<UserInfo> {

    /**
     * 微信小程序登录
     * @param code
     * @return
     */
    Map<String, Object> wxLogin(String code);

    /**
     * 获取新令牌
     * @return
     */
    Map<String, Object> getNewAccessToken();

    void updateUser(UserInfoVo userInfoVo);

    UserInfoVo getUserInfo(Long userId);


    Map<Long, String> getUserPaidAlbumTrack(Long userId, Long albumId);

    Boolean getUserPaidAlbum(Long userId, Long albumId);

    Boolean collect(Long trackId);

    TrackStatMqVo prepareTrackStatMqDto(Long albumId, Long trackId, String trackStatPlay, int count) ;

    Boolean isCollect(Long trackId);

    Boolean isSubscribe(Long albumId);


    IPage<UserCollectVo> findUserCollectPage(IPage<UserCollectVo> page);

    void updateExpireVip();
}
